﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Petaframe.Caching
{
    public class AbsoluteTimeToken : BaseToken
    {
        private DateTime mNextExpireTime;
        public AbsoluteTimeToken(int absoluteSeconds)
        {
            mNextExpireTime = DateTime.Now.AddSeconds(absoluteSeconds);
        }

        public override bool IsCurrent
        {
            get
            {
                return mNextExpireTime >= DateTime.Now;
            }
        }
    }
}
